# $Id: PKGBUILD 84904 2013-02-25 23:57:50Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Ray Rashif <schiv@archlinux.org>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
# Contributor: Eric Belanger <eric@archlinux.org>
# Contributor: Roberto Alsina <ralsina@kde.org>

pkgbase=python-cx_freeze
pkgname=('python-cx_freeze' 'python2-cx_freeze')
pkgver=4.3.1
pkgrel=1
pkgdesc='Set of utilities for freezing Python scripts into executables'
arch=('x86_64' 'i686')
url='http://cx-freeze.sourceforge.net/'
license=('PSF')
makedepends=('python' 'python2')
source=("http://prdownloads.sourceforge.net/cx-freeze/cx_Freeze-$pkgver.tar.gz")
sha256sums=('11f8818ab4e1754c81c1226ce3430f29e6ba231a22a153ce3794a5cc464fa11b')

package_python-cx_freeze() {
  depends=('python')
  conflicts=('cx_freeze' 'python2-cx_freeze')

  cd "$srcdir/cx_Freeze-$pkgver"
  python setup.py install --root "$pkgdir" --optimize 1
}

package_python2-cx_freeze() {
  depends=('python2')
  conflicts=('cx_freeze' 'python-cx_freeze')
  replaces=('cx_freeze')

  cd "$srcdir/cx_Freeze-$pkgver"
  python2 setup.py install --root "$pkgdir" --optimize 1
  # Python 2 shebang fix
  find "$pkgdir" -name qotd.py -exec sed -i '0,/on/s//on2/' {} \;
}

# vim:set ts=2 sw=2 et:
